<template>
  <div>
    <h3>父组件</h3>
    <div>son msg: {{ sonMsg }}</div>
    <Son :name="name"
         :getSonMsg="getSonMsg" />

  </div>
</template>

<script setup lang="ts">
  import { ref } from 'vue'
  import Son from './Son.vue'

  let name = ref('gary')

  let sonMsg = ref('')

  function getSonMsg(val: string) {
    sonMsg.value = val
  }
</script>

<style>
</style>